﻿using System.Collections.Generic;

namespace Softserve.WcfServices.Logic
{
    using System;
    using Softserve.Pottery.Infrastructure;
    using Softserve.Pottery.Store;
    using Softserve.Pottery.Store.Contracts;
    using Softserve.Pottery.Store.Domains;

    public class StoreLogic : IStoreScopeContract
    {
        public StoreLogic()
        {

        }

        public StoreLogic(IServiceProvider provider)
        {
            controller = (StoreController)provider.GetService(typeof(StoreLogic));
        }

        #region ICatalogContract

        public IEnumerable<Catalog> GetCatalogs()
        {
            throw new NotImplementedException();
        }

        #endregion

        #region INotificationContract

        public Notification CreateNotification(int id, string receiver, NotificationType notificationType, string message = default(string))
        {
            return controller.CreateNotification(id, receiver, notificationType, message);
        }

        #endregion

        #region IProductContract

        public void AddProduct(Product item)
        {
            controller.AddProduct(item);
        }

        public void EditProduct(Product item)
        {
            throw new NotImplementedException();
        }

        public void RemoveProduct(Product item)
        {
            controller.RemoveProduct(item);
        }

        public IEnumerable<Product> GetProducts()
        {
            throw new NotImplementedException();
        }

        public Product GetProductById(int productId)
        {
            throw new NotImplementedException();
        }

        public IEnumerable<Product> GetProductsByCatalogId(int catalogId)
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IUserContract

        public User UserCreation(int id, string partnerCardNumber, decimal cumulativeSum, int status, DateTime dateCreate, string firstName, string lastName, string middleName, string email, string phoneNumber, UserGroup Group)
        {
            return controller.UserCreation(id, partnerCardNumber, cumulativeSum, status, dateCreate, firstName, lastName, middleName, email, phoneNumber, Group);
        }

        #endregion

        #region Private

        private StoreController controller;

        #endregion
    }
}
